From 90942c4fefebb879a425547d1dd713b9c11bd9c5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 7 Nov 2005 12:05:43 +0000 Subject: [PATCH] Fix also the other place where maskstride was calculated. --- gdk/win32/gdkcursor-win32.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gdk/win32/gdkcursor-win32.c b/gdk/win32/gdkcursor-win32.c index ea82597385..27bfd20c0c 100644 --- a/gdk/win32/gdkcursor-win32.c +++ b/gdk/win32/gdkcursor-win32.c @@ -683,11 +683,7 @@ pixbuf_to_hbitmaps_alpha_winxp (GdkPixbuf *pixbuf, } /* MSDN says mask rows are aligned to "LONG" boundaries */ - maskstride = width / 8; - if (maskstride % 4 != 0) - maskstride += 4 - (maskstride % 4); - if (maskstride < 4) /* one word minimum */ - maskstride = 4; + maskstride = (((width + 31) & ~31) >> 3); indata = gdk_pixbuf_get_pixels (pixbuf); rowstride = gdk_pixbuf_get_rowstride (pixbuf); -- 2.30.2